package com.lq.springcloud.controller;


import com.lq.springcloud.entities.CommResult;
import com.lq.springcloud.entities.Payment;
import com.lq.springcloud.service.PaymentFeginService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;


@RestController
public class OrderFeginController {
    @Resource
    private PaymentFeginService paymentFeginService;

    @GetMapping(value = "/feign/payment/get/{id}")
    public CommResult<Payment> getId(@PathVariable("id") Long id) {
        return paymentFeginService.getPaymentById(id);
    }

    @GetMapping(value = "/feign/payment/timeout")
    public String paymentFeginTimeOut() {
        return paymentFeginService.paymentFeginTimeOut();
    }

}